<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <title>患者信息管理</title>
  <link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" />
  <link rel="stylesheet" href="../static/css/global.css" />
  <link rel="stylesheet" href="../static/css/patient.css" />
</head>

<body>
  <main class="mainBox" th:fragment="patientManage">
    <div class="container shadow-md-sm">
      <header>
        <form class="col-12" action="/admin/patientManage" method="get">
          <div class="input-group mb-4 z-0">
            <input type="text" class="form-control" placeholder="请输入患者相关信息，例如姓名、性别、邮箱、手机号、身份证号等" name="fuzzyQuery" />
            <button class="btn btn-outline-secondary" type="submit">
              查询患者
            </button>
          </div>
        </form>
      </header>
      <div class="table-responsive-xxl">
        <table class="table table-striped align-middle">
          <thead>
            <tr>
              <th scope="col">编号</th>
              <th scope="col">姓名</th>
              <th scope="col">性别</th>
              <th scope="col">出生日期</th>
              <th scope="col">电子邮箱</th>
              <th scope="col">手机号码</th>
              <th scope="col">身份证号</th>
              <th scope="col">医保账号</th>
              <th scope="col">操作</th>
            </tr>
          </thead>
          <tbody>
            <tr th:each="patient: ${patientList}">
              <th scope="row" th:text="${patient.id}">1</th>
              <td th:text="${patient.name}">Mark</td>
              <td th:text="${patient.sex}">Otto</td>
              <td th:text="${patient.birthday}">@mdo</td>
              <td th:text="${patient.email}">Mark</td>
              <td th:text="${patient.phone}">Otto</td>
              <td th:text="${patient.identifyCard}">@mdo</td>
              <td th:text="${patient.medicalCard}">Mark</td>
              <td th:switch="${patient.status}">
                <button th:case="true" class="btn btn-outline-warning btn-sm">
                  <a th:href="@{/admin/patientManage/blockOpreation(id=${patient.id},status=false)}">
                    冻结
                  </a>
                </button>
                <button th:case="false" class="btn btn-outline-success btn-sm">
                  <a th:href="@{/admin/patientManage/blockOpreation(id=${patient.id},status=true)}">
                    解封
                  </a>
                </button>
              </td>
            </tr>
          </tbody>
        </table>
      </div>
    </div>
  </main>
  <script src="../static/bootstrap/js/bootstrap.bundle.min.js"></script>
</body>

</html>